interactive and script modes in python